Skip to content

feat: add you.com search provider#7

Open
mouse-value-add wants to merge 1 commit intopaperfoot:masterfrom
mouse-value-add:feat/add-you-search-provider
Open

feat: add you.com search provider#7
mouse-value-add wants to merge 1 commit intopaperfoot:masterfrom
mouse-value-add:feat/add-you-search-provider

Conversation

@mouse-value-add
Copy link
Copy Markdown

Hi maintainers, thanks for building and maintaining search-cli.

I’m proposing a small provider addition that seems aligned with the project’s goal of giving agents one unified search interface across multiple backends.

Why this repo / why this change

search-cli is already structured around a clean provider abstraction, and web/news search is core to agent intelligence workflows. Adding You.com gives users one more optional provider with a useful free-tier path (up to 100 searches/day without a key), while keeping the existing routing model intact.

What changed

  • Added new provider module: src/providers/you.rs
    • Integrates You.com Search API (GET https://api.you.com/v1/agents/search)
    • Supports general web results and news results
    • Includes error handling for non-2xx responses and 429 rate limits
  • Registered provider in src/providers/mod.rs
  • Added you to mode routing in src/engine.rs for:
    • general
    • news
  • Added config/env support in src/config.rs and config.example.toml
    • keys.you
    • SEARCH_KEYS_YOU
    • aliases: YDC_API_KEY, YOU_API_KEY
  • Updated CLI/help/agent-info metadata for provider count/list (src/cli.rs, src/main.rs, src/types.rs)
  • Updated README with provider docs, env setup, and usage context
  • Updated integration tests for provider count/list checks (tests/integration.rs)

Setup / usage

Any of the following works:

  • search config set keys.you <YOUR_KEY>
  • export SEARCH_KEYS_YOU=<YOUR_KEY>
  • export YDC_API_KEY=<YOUR_KEY> (alias)
  • export YOU_API_KEY=<YOUR_KEY> (alias)

The provider is then available via:

  • auto/general routing
  • news routing
  • explicit provider selection (-p you)

Backward compatibility / risk

  • No existing provider behavior is removed.
  • The change is additive and scoped to a new optional provider.
  • Existing command surface and mode semantics remain unchanged, except that general/news now include an additional candidate provider.

Validation done

  • Static validation of wiring across provider registry, config, routing, docs, and tests.
  • I could not execute Rust tests in this environment because cargo is unavailable on the runner (cargo: command not found).

If you prefer a narrower initial rollout (for example, include you only when explicitly selected with -p you before adding it to default general/news routing), I’m happy to adjust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant